package adminResource

import (
	"grpc.getaway.adminspro.padmins.com/internal/api/module/admin/container"
	"grpc.getaway.adminspro.padmins.com/internal/api/utils/rpc"
	pbAdmin "grpc.getaway.adminspro.padmins.com/pkg/proto/admin"
	"strconv"
)

func Detail(c *container.Context) (interface{}, error) {
	id, _ := strconv.ParseInt(c.Request.ParamsToString("id"), 10, 64)
	req := &pbAdmin.AdminResourceDetailReq{
		Id: id,
	}
	return rpc.GetAdminClient().AdminResourceDetail(c.GetContext(), req)
}
